<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
			
	<rich:separator height="1" />
	<a4j:outputPanel ajaxRendered="true">
		<h:messages style="color:red" />
	</a4j:outputPanel>
	<h:panelGrid columns="2" width="100%">

		<h:form id="form1">
				<h:panelGrid columns="2">
					<h:outputText value="Name" />
					<h:inputText value="#{userBean.name}">
						<a4j:support event="onkeyup" reRender="outname" />
					</h:inputText>
					<h:outputText value="Job:" />
					<h:inputText  required="true" id="job2" value="#{userBean.job}" />
				</h:panelGrid>
		</h:form>

		<h:form id="form2">
			<h:panelGrid columns="2">
				<h:outputText value="Name" />
				<a4j:region>
					<h:inputText value="#{userBean.name}">
						<a4j:support event="onkeyup" reRender="outname" />
					</h:inputText>
				</a4j:region>
				<h:outputText value="Job" />
				<h:inputText   required="true"  id="job1"  value="#{userBean.job}" />
			</h:panelGrid>
		</h:form>

	</h:panelGrid>
	<h:outputText id="outname" style="font-weight:bold" value="Typed Name: #{userBean.name}" />
	<rich:separator style="padding-top:10px" height="1" />
</ui:composition>